<template>
	<view class="">
		<view class="text_top">
			<view class="solids-bottom padding-xs flex align-center">
				<view class="flex-sub text-center">
					<view class="solid-bottom text-sl padding">
						<text class="text-price text-black text-bold">100</text>
					</view>
				</view>
			</view>
		</view>
		<view class="cu-list menu card-menu margin-top sm-border">
			<view class="cu-item" :class="menuArrow?'arrow':''">
				<view class="content">
					<text class="cuIcon-circlefill text-grey"></text>
					<text class="text-grey">飞马约食支付</text>
				</view>
			</view>		
		</view>
		<view class="btn_buttom">
			<view class="padding flex flex-direction">
				<button class="cu-btn bg-green margin-tb-sm lg" @click="wxPays">支付订单</button>
			</view>
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {


			}
		},
		methods:{
			//第二步：发起支付
			// {
			//     "msg": "操作成功",
			//     "code": "SXF0000",
			//     "sign": "ECCpu46eJZHRQJ8tZyva4h5moNwG4Gx7JYFv/SrCdJkm0Ql/6wITYinWAXeX/jlUmGedLf0cCRn3nObPHYQxqx6yQmaMADiSbXPMLRdSDMrjSD4btNEiO2XigwOISK85tnNrKeE7DTTKSbi5+DR+8lB6fyXKA1jqMba4xi6i+pXjV2nb5KuSRI05XT4aud89NrMqjVs4lwqVYvu9SH0iYstOuFV0iYvLzvAghoRNT54n4BFZa5lanZzJMe5EM301P9bE2ZRJqu6MshR6S5uSEtWQwJVA0YD5j0qmYSnfWjbFl1BrXrnhFkz1c4Zt/8y3t3+6BHb0s2vLtQUeN60ItQ==",
			//     "respData": {
			//         "ordNo": "GFCB2020111309024657680",
			//         "bizMsg": "交易成功",
			//         "bizCode": "0000",
			//         "payUrl": "https://crs-app-web.vbill.cn/native1?id=386526ff407b40f4913a269a20223c9f",
			//         "uuid": "f3c815320f3d45718df14cda33125ef2"
			//     },s
			//     "signType": "RSA",
			//     "orgId": "37969886",
			//     "reqId": "GAOFANSUIXINGFU20201113090246460"
			// }
			wxPays(){
				return new Promise((resolve,reject)=>{
					wx.requestPayment({
						timeStamp:"GFCB2020111309024657680",
						nonceStr:"f3c815320f3d45718df14cda33125ef2",
						package:`prepay_id="GAOFANSUIXINGFU20201113090246460"`,
						signType:'RSA',
						paySign:"ECCpu46eJZHRQJ8tZyva4h5moNwG4Gx7JYFv/SrCdJkm0Ql/6wITYinWAXeX/jlUmGedLf0cCRn3nObPHYQxqx6yQmaMADiSbXPMLRdSDMrjSD4btNEiO2XigwOISK85tnNrKeE7DTTKSbi5+DR+8lB6fyXKA1jqMba4xi6i+pXjV2nb5KuSRI05XT4aud89NrMqjVs4lwqVYvu9SH0iYstOuFV0iYvLzvAghoRNT54n4BFZa5lanZzJMe5EM301P9bE2ZRJqu6MshR6S5uSEtWQwJVA0YD5j0qmYSnfWjbFl1BrXrnhFkz1c4Zt/8y3t3+6BHb0s2vLtQUeN60ItQ==",
						success:(res)=>{
							console.log(res)
							resolve(res)
						},
						fail:(err)=>{
							console.log(err)
							reject(err)
							let succ = '取消支付'
							let ico = 'success'
							// this.tIps(succ,ico)
						}
					})
				})
			},
		}

	}
</script>

<style>
	.text_top{
		margin-top: 100rpx;
	}
	.btn_buttom {
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
	}
</style>
